import roslaunch
import time
# import rospy

# http://wiki.ros.org/roslaunch/API%20Usage

# rospy.init_node('en_Mapping', anonymous=True)
# rospy.on_shutdown(self.shutdown)

# source ~/catkin_ws/devel/setup.bash
# source ~/catkin_ws/install/setup.bash

uuid = roslaunch.rlutil.get_or_generate_uuid(None, False)
roslaunch.configure_logging(uuid)

launch = roslaunch.parent.ROSLaunchParent(uuid, ["/home/u/catkin_ws/src/realsense/realsense_ros_camera/launch/rs_rgbd.launch"])

launch.start()

time.sleep(3)

launch2 = roslaunch.parent.ROSLaunchParent(uuid, ["/home/u/catkin_ws/src/ros_object_analytics/object_analytics_launch/launch/analytics_movidius_ncs.launch"])

launch2.start()

time.sleep(3)

launch3 = roslaunch.parent.ROSLaunchParent(uuid, ["/home/u/catkin_ws/src/ros_object_analytics/object_analytics_visualization/launch/rviz.launch"])

launch3.start()

time.sleep(60)

launch3.shutdown()

launch2.shutdown()

launch.shutdown()
